package com.example.book_system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.book_system.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author BlueRose
 */
@Mapper
public interface BookMapper extends BaseMapper<Book> {
    /**
     * 分页查找
     * @param page 当前页
     * @param name 书名
     * @return 书的列表
     */
    IPage<Book> selectBookByPage(Page<Book> page, @Param("name") String name);
}
